import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        long s = scanner.nextLong();

        //第一行为成本，第二行为下标
        long[][] arr = new long[2][n];
        //训练总成本
        long sum = 0;
        for (int i = 0; i < n; i++) {
            arr[0][i] = scanner.nextLong();
            arr[1][i] = scanner.nextLong();
            sum += arr[0][i] * arr[1][i];
        }

        long ret = 0;
        while (f(n, arr) >= s) {
            ret += s;
            for (int i = 0; i < n; i++) {
                arr[1][i]--;
            }
        }


        for (int i = 0; i < n; i++) {
            if (arr[1][i] > 0) {
                ret += arr[0][i] * arr[1][i];
            }
        }

        System.out.println(ret);

        scanner.close();
    }

    //计算所有训练次数大于0的士兵一次训练的成本
    public static long f(int n, long[][] arr) {
        long sum = 0;
        for (int i = 0; i < n; i++) {
            if (arr[1][i] > 0) {
                sum += arr[0][i];
            }
        }

        return sum;
    }

}
